<?php
namespace Business;
class EbookModel{
    static public function trial($book_id){
        $res = \BookModel::select('book.book_id','book.name','book.author','book.cover_front','book.version')
            ->where('ub.user_id',$user_id)
            ->join('user_book as ub','ub.book_id','=','book.book_id');
        $res = $res->first();
        if($res){
            $ret = $res->toArray();
        }else{
            $ret = array();
        }
        return $ret;
    }
}
